Add procedures table with CIFP transition sequences - #31
Merged
Conversation
Parse the FAA CIFP (FAACIFP18, ARINC 424-18) SID/STAR/approach records into flyable transition sequences and load them into a new `procedures` table, so an approach with several IAFs becomes one sequence per starting point. - procedures.py: stdlib-only parser producing procedures.csv with columns airport, procedure, initial_fix, sequence, fix, altitude. Approach names are resolved from the d-TPP metafile (SIDs/STARs via faanfd18, approaches by decoding/matching the CIFP identifier), falling back to synthesized names. - common.make_data(): generate procedures.csv alongside the existing CIFP CSV. - data.py: best-effort download of the d-TPP metafile (non-fatal if missing). - legacy/ and x/ importother.sql: create and import the procedures table. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
procedurestable built from the FAA CIFP (FAACIFP18, ARINC 424-18). It expands SID/STAR/approach records into flyable transition sequences, so an approach with several IAFs becomes one sequence per starting point.procedures.py(stdlib only) producesprocedures.csvwith columns:airport, procedure, initial_fix, sequence, fix, altitude.faanfd18; approaches are named by decoding/matching the CIFP identifier to the chart name (~100% match on the current cycle). Falls back to a synthesized name when the metafile is unavailable.Details
common.make_data()now callsprocedures.parse_procedures()right aftercifp.parse_cifp(), so the CSV is regenerated for both thelegacyandxdatabase builds.data.pydoes a best-effort download of the d-TPP metafile for the current cycle; wrapped in try/except so a not-yet-published metafile can't break the build.legacy/importother.sqlandx/importother.sqlcreate and import theprocedurestable (same pattern ascifp_sid_star_app)..separator "," / .importdoes not handle quoted fields.Output example (KBVY RNAV (GPS) RWY 09)
Test plan
procedures.pyon the live cycle: 166,576 rows generated.procedures.csvinto SQLite via the exact pipeline mechanism (.separator "," + .import): 166,576 rows, 0 column-alignment errors.RNAV (GPS) RWY 09sequences match the expected output.py_compilepasses forprocedures.py,common.py,data.py.Made with Cursor